<!--
//******************************************************************
//* Copyright (c) 2008 Ford Motor Company. All Rights Reserved.
//*
//*
//* $$Workfile:   costStructureNew.jsp  $$
//* $$Revision:   1.0  $$
//* $$Author:   JLOPE262  $$
//* $$Date:   Nov 14 2008 08:57:48  $$
//*
//* Description: Description of file goes here
//******************************************************************
-->
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://displaytag.sf.net/el" prefix="display-el" %>
<%@ taglib uri="ford-arg/tags" prefix="ft" %>

<script language="JavaScript" src="./scripts/popups.js"></script>
<script language="JavaScript" src="./scripts/CalendarPopup.js"></script>
<script language="JavaScript" src="./scripts/ajaxSearch.js"></script>

<script language="javascript">		

	function load() {
		document.CostStructureFileLoadForm.action = "CostStructureFileLoadActionDoLoad.do";
		document.CostStructureFileLoadForm.submit();	
	}
	
</script>

<table>
	<tr>
		<td><h2><bean:message key="costStructure.fileUpload.label.title"/></h2></td>
	</tr>
</table>
<br/>
<html:form action="/CostStructureFileLoadActionInit">
	<table>
		<tr>
			<td  class="text_blue_bold align_left" colspan="100%">
				<bean:message key="costStructure.new.label.id" />: <bean:message key="costStructure.new.label.auto" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				<bean:message key="costStructure.new.label.version" />: <bean:write name="CostStructureNewForm" property="version" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				<b><bean:message key="costStructure.new.label.status" />: <bean:message key="label.draft" /></b>
			</td>
		</tr>
		<tr>
			<td class="text_blue_bold align_left">
				<bean:message key="costStructure.new.label.tier" />
			</td>
			<td class="text_blue_bold align_left">
				1
			</td>
		</tr>
		<tr>
			<td class="text_blue_bold align_left">
				<bean:message key="costStructure.new.label.description" />
			</td>
			<td class="align_left">
				<html:text property="description" maxlength="50" size="50" />
			</td>
		</tr>
		<tr>
			<td class="text_blue_bold align_left">
				<bean:message key="costStructure.new.label.appliesTo" />
			</td>
			<td class="align_left">
				<html:select property="costStructureTypeSel" styleId="appliesTo" onchange="onChangeAppliesTo(this);" disabled="${blockAppliesTo}">
					<html:option value="-1"><bean:message key="label.selectOption" /></html:option>				
					<html:options collection="typesCostStructureCol" property="value" labelProperty="label" />
				</html:select>
			</td>
		</tr>
		<tr>
			<td class="text_blue_bold align_left">
				<bean:message key="costStructure.new.label.supplier" />
			</td>
			<td class="text_blue_bold align_left">
			<div id="supplier">
				<html:select property="supplierTypeSel" disabled="${blockAppliesTo}" styleId="supplierClass">
					<html:option value="-1"><bean:message key="label.selectOption" /></html:option>				
					<html:options collection="supplierTypeCol" property="value" labelProperty="label" />
				</html:select>
				&minus;
				<html:text property="supplierCode" maxlength="6" size="6" disabled="${blockAppliesTo}" styleId="supplierCode"/>
				<html:button property="lookupSupp" onclick="lookupSupplier();" styleClass="button" disabled="${blockAppliesTo}">...</html:button>
				<html:button property="findSupplier" onclick="findSupplierPopup('supplierClass', 'supplierCode');" styleClass="button" style="width:25px;" disabled="${blockAppliesTo}">?</html:button>
				<div style="display:inline;" id="lookupedSupplier" />
			</div>
			</td>
		</tr>
		<tr>
			<td class="text_blue_bold align_left">
				<bean:message key="commodity.label" />
			</td>
			<td class="align_left">			
			<div id="commodity">
				<html:select property="commoditySel" disabled="${blockAppliesTo}">
					<html:option value="-1"><bean:message key="label.selectOption" /></html:option>
					<html:options collection="commoditiesCol" property="eesp02CommodityNumberK" labelProperty="eesp02CommodityNameN" />
				</html:select>			
			</div>				
			</td>
		</tr>
		<tr>
			<td class="text_blue_bold align_left">
				<bean:message key="part.label" />
			</td>
			<td class="align_left">
			<div id="part">
				<html:select property="partClassSel" disabled="${blockAppliesTo}" styleId="partClass">
					<html:option value="-1"><bean:message key="label.selectOption" /></html:option>				
					<html:options collection="partClassesCol" property="value" labelProperty="label" />
				</html:select>
				&minus;
				<html:text property="partPrefix" maxlength="10" size="10" disabled="${blockAppliesTo}" styleId="partPrefix" />
				&nbsp;
				<html:text property="partBase" maxlength="10" size="10" disabled="${blockAppliesTo}" styleId="partBase" />
				&nbsp;
				<html:text property="partSufix" maxlength="10" size="10" disabled="${blockAppliesTo}" styleId="partSuffix" />
				<html:button property="lookPart" onclick="lookupPart();" styleClass="button" disabled="${blockAppliesTo}">...</html:button>
				<html:button property="findPart" onclick="findPartPopup('supplierClass', 'supplierCode', 'partClass', 'partPrefix', 'partBase', 'partSuffix');" styleClass="button" style="width:25px;" disabled="${blockAppliesTo}">?</html:button>
				<div style="display:inline;" id="lookupedPart" />
			</div>
			</td>			
		</tr>
		<tr>
			<td class="text_blue_bold align_left">
				<bean:message key="costStructure.new.label.dateIn" />
			</td>
			<td class="text_blue_bold align_left">
				<html:text property="dateIn" maxlength="10" size="10"/><A name="dateInAnchor"> </A><html:button property="calendarIn" onclick="cal.select(document.CostStructureNewForm.dateIn,'dateInAnchor','dd/MM/yyyy'); return false;" styleClass="button_small">...</html:button>				
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				<bean:message key="costStructure.new.label.dateOut" />&nbsp;&nbsp;
				<html:text property="dateOut" maxlength="10" size="10"/><A name="dateOutAnchor"> </A><html:button property="calendarOut" onclick="cal.select(document.CostStructureNewForm.dateOut,'dateOutAnchor','dd/MM/yyyy'); return false;" styleClass="button_small">...</html:button>				
			</td>
		</tr>
		<tr>
			<td class="text_blue_bold align_left" colspan="100%">
				<bean:message key="costStructure.new.label.obs" />
			</td>
		</tr>
		<tr>
			<td class="align_left" colspan="100%">
				<html:text property="observations" maxlength="500" style="width:800px;"/>
			</td>
		</tr>
	<logic:equal name="CostStructureNewForm" property="comeFrom" value="header">
		<tr>
			<td style="height:15px;" />
		</tr>
		<tr>
			<td class="align_right" colspan="100%">
				<html:button property="updateCS" onclick="update();" styleClass="button"><bean:message key="label.update" /></html:button>
			</td>
		</tr>
	</logic:equal>
	</table>
</html:form>
